import { Swiper } from "antd-mobile";

const img = [
  "https://img.zcool.cn/community/01464f592922bba801216a3e177fcc.jpg@2o.jpg",
  "https://img.zcool.cn/community/01e3b159292366b5b3086ed44327e2.jpg@2o.jpg",
  "https://img.zcool.cn/community/01dd9a592922e9a801216a3e0291a9.jpg@2o.jpg",
  "https://img.zcool.cn/community/01fa19592922bda801216a3e10356b.jpg@2o.jpg",
];

const items = img.map((item, index) => (
  <Swiper.Item key={index}>
    <div onClick={() => {}}>
      <img src={item} width="100%" alt="" />
    </div>
  </Swiper.Item>
));

const LoopPicture = () => {
  return (
    <>
      <Swiper autoplay loop>
        {items}
      </Swiper>
    </>
  );
};

export default LoopPicture;
